<?php

namespace App\Models;

use App\Libs\DataFormat;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class UserProject extends Model
{

    use DataFormat;

    protected $table = 'user_project';
    protected $dates = [''];

    //protected $guarded = ['id', 'created_at'];
    protected $fillable = ['user_id', 'project_id', 'verify_status','reward_time', 'extends', 'payment'];

    protected  $casts = [
        'extends'=>'array',
        'payment'=>'array',
    ];

    public function user()
    {
        return $this->hasOne('App\Models\User', 'id', 'user_id');
    }

    public function project()
    {
        return $this->hasOne('App\Models\Project', 'id', 'project_id');
    }

}
